Skip to content

feat(connectors): Delta Lake Sink Connector#2889

Open
kriti-sc wants to merge 25 commits intoapache:masterfrom
kriti-sc:delta-sink
Open

feat(connectors): Delta Lake Sink Connector#2889
kriti-sc wants to merge 25 commits intoapache:masterfrom
kriti-sc:delta-sink

Conversation

@kriti-sc
Copy link
Copy Markdown
Contributor

@kriti-sc kriti-sc commented Mar 7, 2026

Which issue does this PR close?

Closes #1852

Rationale

Delta Lake is a data analytics engine, and very popular in modern streaming analytics architectures.

What changed?

Introduces a Delta Lake Sink Connector that enables writing data from Iggy to Delta Lake.

The Delta Lake writing logic is heavily inspired by the kafka-delta-ingest project, to have a proven starting ground for writing to Delta Lake.

Local Execution

  1. Produced 32632 messages with schema user_id: String, user_type: u8, email: String, source: String, state: String, created_at: DateTime<Utc>, message: String using sample data producer.
  2. Consumed messages using the Delta Lake sink and created a Delta table on filesystem.
  3. Verified number of rows in delta table and the schema.
  4. Added unit tests and e2e tests, both passing.
image Left: messages produced; Right(top): messages consumed by Delta sink; Right(bottom): Inspecting Delta table in python

AI Usage

If AI tools were used, please answer:

  1. Which tools? Claude Code
  2. Scope of usage? generated functions
  3. How did you verify the generated code works correctly? Manual testing by producing data into Iggy and then running the sink and verifying local Delta Lake creation, unit tests and e2e tests for local Delta Lake and Delta Lake on S3.
  4. Can you explain every line of the code if asked? Yes

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 95.92944% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.81%. Comparing base (b05ffa3) to head (55bb44a).

Files with missing lines Patch % Lines
core/connectors/sinks/delta_sink/src/sink.rs 23.07% 20 Missing ⚠️
core/connectors/sinks/delta_sink/src/coercions.rs 97.51% 6 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2889      +/-   ##
============================================
+ Coverage     70.66%   70.81%   +0.15%     
  Complexity      943      943              
============================================
  Files          1114     1118       +4     
  Lines         94778    95515     +737     
  Branches      71978    72732     +754     
============================================
+ Hits          66976    67643     +667     
- Misses        25332    25380      +48     
- Partials       2470     2492      +22     
Components Coverage Δ
Rust Core 70.96% <95.92%> (+0.21%) ⬆️
Java SDK 62.30% <ø> (ø)
C# SDK 69.10% <ø> (-0.33%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (+0.12%) ⬆️
Go SDK 38.97% <ø> (ø)
Files with missing lines Coverage Δ
core/connectors/sdk/src/convert.rs 100.00% <100.00%> (ø)
core/connectors/sinks/delta_sink/src/lib.rs 100.00% <100.00%> (ø)
core/connectors/sinks/delta_sink/src/storage.rs 100.00% <100.00%> (ø)
core/connectors/sinks/delta_sink/src/coercions.rs 97.51% <97.51%> (ø)
core/connectors/sinks/delta_sink/src/sink.rs 23.07% <23.07%> (ø)

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@hubcio hubcio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall good direction, but needs a bit refining. thanks for contribution @kriti-sc

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Mar 26, 2026

@kriti-sc I will finish review after both #2925 and #2933 get merged and you rebase against these.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR.

Thank you for your contribution!

@github-actions github-actions bot added the stale Inactive issue or pull request label Apr 3, 2026
@github-actions github-actions bot removed the stale Inactive issue or pull request label Apr 4, 2026
let mut opts = HashMap::new();

match config.storage_backend_type.as_deref() {
Some("s3") => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use custom enum to avoid magic strings.


pub(crate) fn build_storage_options(
config: &DeltaSinkConfig,
) -> Result<HashMap<String, String>, Error> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of returning a hash map, we could have the dedicated structs (per storage provider) with optional fields - and then either an enum could be returned or a single struct with all available storages as optional fields?

),
];
let storage_options = HashMap::from([
("AWS_ACCESS_KEY_ID".into(), MINIO_ACCESS_KEY.into()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here (based on my previous suggestion) - we would use the dedicated option struct, and then simply serialize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Delta Lake connectors

5 participants